package com.bc66.tiger.bizsys.menucategories.dao.impl;

import com.bc66.tiger.bizsys.menucategories.dao.IMenuCatogoriesDao;
import com.bc66.tiger.bizsys.menucategories.model.MenuCategoriesBean;
import com.bc66.tiger.framework.base.BaseIbatis3Dao;
import com.bc66.tiger.framework.page.Page;
import com.bc66.tiger.framework.page.PageRequest;

public class MenuCatogoriesDaoImpl extends BaseIbatis3Dao<MenuCategoriesBean, java.lang.Long> implements
		IMenuCatogoriesDao {
	
	@Override
	public Class getEntityClass() {
		// TODO Auto-generated method stub
		return MenuCategoriesBean.class;
	}
	
	@Override
	public void deleteById(Long id) {
		// TODO Auto-generated method stub
		super.deleteById(id);
	}
	

	@Override
	public void saveOrUpdate(MenuCategoriesBean entity) {
		// TODO Auto-generated method stub
		if(entity.getId()==null){
			
			this.save(entity);
			
		}else{
			
			this.update(entity);
			
		}
		
	}
	
	@Override
	public MenuCategoriesBean getById(Long primaryKey) {
		// TODO Auto-generated method stub
		return (MenuCategoriesBean)super.getById(primaryKey);
	}
	
	@Override
	public Page findByPageRequest(PageRequest pageRequest) {
		// TODO Auto-generated method stub
		
		return this.pageQuery(this.getMapperPath()+".offsetCategories", pageRequest);
	}
	

}
